package com.yoso.shop.application.service.impl;

import com.alibaba.fastjson.JSON;
import com.yoso.base.service.BaseService;
import com.yoso.shop.application.service.ICommodityBranchService;
import com.yoso.shop.domain.commodity.CommodityBranchEntity;
import com.yoso.shop.domain.commodity.CommodityBranchEntityExample;
import com.yoso.shop.infrastructure.dao.commodity.CommodityBranchEntityMapper;
import com.yoso.shop.interfaces.vo.commodity.CommodityBranchVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author yoso
 * @date 2021/12/8
 */
@Service
public class CommodityBranchServiceImpl extends BaseService<CommodityBranchEntity, CommodityBranchVo, CommodityBranchEntityExample> implements ICommodityBranchService {
    @Autowired
    private CommodityBranchEntityMapper commodityBranchEntityMapper;
    @Override
    public CommodityBranchEntity V2E(CommodityBranchVo data) {
        return JSON.parseObject(JSON.toJSONString(data),CommodityBranchEntity.class);
    }

    @Override
    public CommodityBranchVo E2V(CommodityBranchEntity data) {
        return JSON.parseObject(JSON.toJSONString(data),CommodityBranchVo.class);

    }

    @Override
    public CommodityBranchEntityExample getEntityExample(Map<String, String> paramMap) {
        return null;
    }


}
